import request from "@/Http/request"


//获取权限
export const GetPermission=async()=>{
    return request({
        url:"/api/Permission/GetPermission",
        method:"get",
    });
};


//分配权限
export const SetPermission = async (id: any, data: number[]) => {
    return request({
        url: "/api/Permission/SetPermission?RoleId="+id,
        method: "post",
        data: data
    });
};

//获取角色权限
export const GetPermissionByRoleId=async(id:any)=>{
    return request({
        url:"/api/Permission/GetRolePermission?RoleId="+id,
        method:"get",
    });
};